package com.ihighest.app.infox.adapter;

import android.content.Context;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.BaseAdapter;
import android.widget.TextView;

import com.ihighest.app.infox.R;

public class BusinessListViewAdapter extends BaseAdapter {

	private LayoutInflater inflater;
	Context context;

	public BusinessListViewAdapter(Context context) {
		super();
		this.context = context;

		inflater = LayoutInflater.from(context);
	}

	@Override
	public int getCount() {
		// TODO Auto-generated method stub
		return 3;
	}

	@Override
	public Object getItem(int arg0) {
		// TODO Auto-generated method stub
		return arg0;
	}

	@Override
	public long getItemId(int arg0) {
		// TODO Auto-generated method stub
		return arg0;
	}

	@Override
	public View getView(int arg0, View convertView, ViewGroup arg2) {
		// TODO Auto-generated method stub
		ViewHolder holder;
		if (convertView == null) {
			holder = new ViewHolder();
			convertView = inflater.inflate(
					R.layout.infox_business_listitemlayout, null);

			holder.business_item_title = (TextView) convertView
					.findViewById(R.id.id_busisess_title);
			holder.business_item_body = (TextView) convertView
					.findViewById(R.id.id_business_body);

			convertView.setTag(holder);
		} else {
			holder = (ViewHolder) convertView.getTag();
		}

		return convertView;
	}

	class ViewHolder {

		TextView business_item_title;
		TextView business_item_body;

	}

}
